package com.sc.nft.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sc.nft.mapper.PopupAnnouncementMapper;
import com.sc.nft.entity.PopupAnnouncement;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Repository;

/**
 * app维护以及维护完成的弹窗表(PopupAnnouncement)表Dao层
 *
 * @author wwc
 * @since 2023-07-05 16:58:05
 */
@Slf4j
@Repository
public class PopupAnnouncementDao extends ServiceImpl<PopupAnnouncementMapper, PopupAnnouncement> {

    public PopupAnnouncement getByAppVersion(String appVersion) {
        LambdaQueryWrapper<PopupAnnouncement> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PopupAnnouncement::getAppVersion, appVersion);
        return getOne(queryWrapper);
    }

}
